home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / I-Z / Xlisp_Source.cpt / Step10.DOC < prev    next >
Lisp/Scheme  |  1985-04-27  |  6KB  |  142 lines

  1.  
  2.            STEP 1.0 : A Debugging Tool for use with XLISP 1.4
  3.  
  4.                              30 March 1985
  5.  
  6.                                  by
  7.                           Gregory Frascadore 
  8.  
  9.                         (frascado%umn-cs.CSNET)
  10.                        (75106,662 on COMPUSERVE)
  11.  
  12. INTRODUCTION
  13.  
  14.     STEP is a debugging tool that allows you to set breakpoints and/or 
  15. single step through the evaluation of a lisp program. With STEP you can
  16. interactively debug lisp programs in a manner similar to the debugging of
  17. object code programs using debuggers like DDT, Macsbug, etc.
  18.  
  19.     This document describes STEP's commands and provides some examples of
  20. usage. Since STEP is distributed in source code form you can modify it to
  21. your liking and of course fix any bugs you may (will) find. If you do make
  22. any great changes, I would appreciate hearing about them so that I could
  23. incorporate them into future versions of STEP.
  24.  
  25. ENVIRONMENT
  26.  
  27.     STEP was designed to operate with XLISP 1.4 . It should be easy to 
  28. adapt STEP to work with other lisps since XLISP 1.4 is similar to CommonLisp. STEP will almost certainly have to be modified to work with later versions 
  29. of XLISP.
  30.  
  31. LOADING STEP
  32.  
  33.     In order to function correctly, STEP requires the availability of the 
  34. functions defined in STEPLIB.LSP. Probably the best way to make sure STEPLIB
  35. is loaded is to place a (load "STEPLIB.LSP") in your INIT.LSP file. This
  36. will not only insure that STEPLIB is available for use by STEP, but will 
  37. also allow you to use the "autoload" macro defined in STEPLIB to load STEP.
  38.  
  39.     The best way to load STEP is to place an (autoload step STEP10) in your
  40. INIT.LSP file after the (load "STEPLIB.LSP). The autoload will not actually
  41. load STEP. Instead, STEP will be loaded the first time you make a call to it
  42. using the "step" function described later. This deferred loading scheme helps
  43. minimize wasting memory by only loading STEP when you need it. You can also
  44. use autoload to "load" any other utility packages you may have.
  45.  
  46.     If for some reason you want STEP loaded all the time, just place a
  47. (load "STEP10.LSP") in your INIT.LSP file.
  48.  
  49.     If you have a small memory computer like a 128k Macintosh, you may 
  50. have to do an XLISP (expand) before loading.
  51.  
  52. FUNCTIONS
  53.  
  54.     There are only two functions in the STEP package that are called by
  55. the user: step and nostep.
  56.  
  57.    (step [<atom>]...)  ACTIVATES STEP AND OPTIONALLY SETS BREAKPOINTS
  58.  
  59.        <atom>  specifying one or more <atom>s causes stepping to begin 
  60.                when STEP encounters one of the <atom>s as the car of a  
  61.                list being evaluated. Providing <atom>s to the "step" 
  62.                function is analogous to setting breakpoints with an 
  63.                object code debugger. NOTE the <atom>s are NOT quoted.
  64.  
  65.                If no <atom>s are specified to the step function, STEP
  66.                will start stepping when the next list is evaluated.
  67.  
  68.                Calling the step function a second time resets STEP and/or
  69.                restores stepping after a call to nostep.
  70.  
  71.         returns t always.
  72.  
  73.        Examples:
  74.                (step)          -turns on stepping at next list evaluation.
  75.                (step 'cond)    -stepping begins at first call to 'cond'.
  76.                (step 'if 'let) -stepping begins at first call to 'if' or
  77.                                 'let' whichever comes first.
  78.  
  79.  
  80.    (nostep)           TURNS OFF STEPPING
  81.             
  82.     NOTE: When turning off stepping with "nostep", STEP will actually walk
  83.             you through the execution of nostep. If you want to avoid this
  84.             use the "n" command (described below) in responce to the >> prompt.
  85.             DO NOT use the "g" command as this will undo the nostep.
  86.  
  87.  
  88.         returns t always.
  89.  
  90.  
  91. COMMANDS
  92.  
  93.     Once interactive stepping begins, STEP prompts you for a command before
  94. the evaluation of every list (atoms are evaluated and their values returned
  95. without prompting for commands). There are 13 possible commands you can give
  96. to STEP when you see the >> prompt:
  97.  
  98.     ?       - help. Gives you a brief summary of commands.
  99.     h       - help. Same as ?
  100.  
  101.  
  102.     s       - step. Make a single step.
  103.     #       - step # times. Makes # steps where # is a positive integer.
  104.  
  105.  
  106.     e       - exit. Abort the current evaluation and return t.
  107.     q       - quit. Same as e except q also does a (nostep).
  108.     x       - exit. Same as e.
  109.  
  110.  
  111.     b       - break. Enters an XLISP break loop using the (break) function.
  112.     c       - continue. Continue execution until next breakpoint is 
  113.                     encountered.
  114.     g       - go. Continue evaluations without any further interruptions
  115.                     by set breakpoints.
  116.     n       - nodeeper. Lets you avoid deep grungy details. 
  117.  
  118.  
  119.     + <atom> - adds the atom to the list of breakpoints.
  120.     - <atom> - removes the atom from the list of breakpoints.
  121.  
  122. BUGS/DEFICIENCIES
  123.  
  124.     o STEP will not step into functions called by apply or funcall.
  125.  
  126.     o Program execution is slower than without STEP. The more breakpoints
  127.         that are set the slower things get. Use of the g and n commands 
  128.         will speed things up when you don't want to step any more through 
  129.         the current evaluation.
  130.  
  131.     o STEP eats up memory and stack and is almost impossible to use on a 
  132.         128k macintosh. Other small memory computers may have similar problems.
  133.         You may have to do an (expand) before loading STEP.
  134.  
  135.     o STEP steps through the execution of nostep and use of the "g" command
  136.         will immediately undo the effects of nostep. Use the "n" command 
  137.         instead to avoid walking through nostep.
  138.  
  139.  
  140.  
  141.  
  142.